﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Pokemon
{
    public abstract class Pokemon : Unit
    {
        #region Attribute

        protected int _bulledSpeed;

#endregion

        protected Pokemon(Game game, Blank owner, Vector2 position) 
            : base(game, owner, position)
        {

        }

        protected virtual void Attack()
        {
            _UnitState = UnitState.Attack;
            InitNewState();            
        }

        protected virtual void Idle()
        {
            _UnitState = UnitState.Idle;
            InitNewState();
        }

        public override Point GetCenterPoint()
        {
            var index = GetUnitStateIndex();
            return
                new Point((int)_position.X + _textures[index].GetNextRect().Width - (int)Textures[index].CenterPoint.X,
                    (int)_position.Y + (int)Textures[index].CenterPoint.Y);
        }
    }
}
